function [x,FunVal] = VecFun_Bisection(f,a,b,tol)


sa      =   sign(f(a));
sb      =   sign(f(b));
if any(sa+sb) 
    error('In BISECT: root not bracketed') ;
end

% Initializations  
dx      =   0.5*(b - a);
tol     =   dx.*tol;
x       =   a + dx;
dx      =   sb.*dx;

% Iteration loop
while any(abs(dx)>tol)
    dx      =   0.5*dx;
    FunVal  =   f(x);
    x       =   x - sign(FunVal).*dx;
end

 return